home *** CD-ROM | disk | FTP | other *** search
- Path: anvil.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Speed of random generators
- Date: 1 Mar 1996 12:23:16 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4h7mbkINNqkr@anvil.ugrad.cs.ubc.ca>
- References: <TAKAHASI.96Mar1113825@poisson.ece.cmu.edu>
- NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
-
- In article <TAKAHASI.96Mar1113825@poisson.ece.cmu.edu>,
- Eduardo S. C. Takahashi <takahasi@poisson.ece.cmu.edu> wrote:
- >
- >I'm working in a simulation that requires intensive use of pseudo-random
- >sequences. My problem is that profiling the program I found out that the
- >generation of the sequences is responsible for about 50% of the total
- >execution time. Since each run can take about 4 hours, it would be good
- >if I could save some time.
-
- If the simulation does not absolutely need a ``good'' random number generator,
- you can probably do with rand(). Good random generation is going to be more
- expensive, since you are updating a large accumulator, and doing more complex
- computation.
-
- >Presently, I'm using the function erand48(), and I'm also making some
- >tests with ramdom(). If anyone has a suggestion I would really appreciate!
-
-
- --
-
-